﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using AutoMapper;
using AzureDiagMon.Common.Dtos;
using AzureDiagMon.Common.Interfaces;

namespace AzureDiagMon.Common.Mappings
{
    public class WadLogLevelMapCreator : IMapCreator
    {
        public void CreateMap(IProfileExpression mapper)
        {
            mapper.CreateMap<WadLogLevel, TraceLevel>()
                .ConvertUsing(wadLogLevel => (TraceLevel)((int)wadLogLevel - 1));
            mapper.CreateMap<TraceLevel, WadLogLevel>()
                .ConvertUsing(traceLevel => (WadLogLevel)((int)traceLevel + 1));
        }
    }
}
